import axios from 'axios'

import { IOriginalRouteInfo } from '../interface'
import './__mock__'

/** 获取原始理由节点 */
export const apiGetOriginalRouteInfo = async (waybillNo: string): Promise<IOriginalRouteInfo> => {
  return axios.post(`/tmsapi/original_route/listOriginalRoute`, { waybillNo }).then(res => res.$data)
}
/** 标记已读 */
export const apiUpdateStatus = async ({ status, waybillNo }: { status: 0 | 1; waybillNo: string }): Promise<void> => {
  return axios.post(`/tmsapi/original_route/read`, { status, waybillNo }).then(res => res.$data)
}
